load("//bazel:mongo_src_rules.bzl", "mongo_cc_benchmark", "mongo_cc_library")

package(default_visibility = ["//visibility:public"])

exports_files(
    glob([
        "*.h",
        "*.cpp",
    ]),
)

mongo_cc_library(
    name = "document_value",
    srcs = [
        "document.cpp",
        "document_comparator.cpp",
        "document_metadata_fields.cpp",
        "value.cpp",
        "value_comparator.cpp",
    ],
    deps = [
        "//src/mongo:base",
        "//src/mongo/db/pipeline:field_path",
        "//src/mongo/db/query/datetime:date_time_support",
        "//src/mongo/db/query/util:rank_fusion_util",
        "//src/mongo/db/query/util:validate_id",
    ],
)

mongo_cc_library(
    name = "document_value_test_util",
    srcs = [
        "document_value_test_util.cpp",
    ],
    deps = [
        ":document_value",
        "//src/mongo/unittest",
    ],
)

mongo_cc_benchmark(
    name = "document_bm",
    srcs = [
        "document_bm.cpp",
    ],
    tags = [
        "first_half_bm",
    ],
    deps = [
        ":document_value",
        "//src/mongo/db:server_base",
        "//src/mongo/db/shard_role/lock_manager",
    ],
)
